<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${ param.errorcode }" var="errorcode"></c:set>
<c:if test="${ not empty errorcode and errorcode eq 5 }">
	<script>alert("原始密码错误");</script>
</c:if>
<c:set var="ub" value="${ requestScope.ub }" scope="page" ></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户修改</title>
<style>
input{
	border:1px #993 dashed;
}
td{
	padding:15px 5px;
}
</style>
<script type="text/javascript" src="script/Calendar3.js"></script>
<script type="text/javascript" src="script/RegFormCheck.js"></script>
</head>
<body>
<form id="form" name="form" method="post" onsubmit="return RegFormCheck()" action="update">
	<input type="hidden" name="upwd" id="upwd" value="${ ub.pwd }"/>
	<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
	    <tr>
	      	<td colspan="2" align="center" style="font-size:25px">用户注册</td>
	    </tr>
	    <tr> 	
	      	<td width="200" align="right">用户名：</td>
	      	<td width="400"><input type="text" name="username" id="username" readonly="readonly" value="${ ub.username }"></td>
	    </tr>
	   	<tr>
	      	<td align="right">原始密码：</td>
	      	<td width="400"><input type="password" name="opwd" id="opwd" ></td>
	    </tr>
	    <tr>
	      	<td align="right">密码：</td>
	      	<td width="400"><input type="password" name="pwd" id="pwd" ></td>
	    </tr>
	    <tr>
	      	<td align="right">确认密码：</td>
	      	<td width="400"><input type="password" name="pwd2" id="pwd2"></td>
	    </tr>
	    <tr>
	      	<td align="right">性别：</td>

	      	<c:if test="${ ub.gender eq '男' }">
	      	<td width="400"><input type="radio" id="gender" name="gender" value="男" checked="checked">男<input type="radio" id="gender" name="gender" value="女">女</td>
	      	</c:if>

	      	<c:if test="${ ub.gender eq '女' }">
	      	<td width="400"><input type="radio" id="gender" name="gender" value="男">男<input type="radio" id="gender" name="gender" checked="checked" value="女">女</td>
	      	</c:if>

	    </tr>
	    <tr>
	      	<td align="right">生日</td>
	      	<td width="400"><input type="text" name="birth" id="birth" readonly="readonly" value="${ ub.birth }" onClick="new Calendar().show(this);"/></td>
	    </tr>
	    <tr>
	      	<td align="right">手机号码：</td>
	      	<td width="400"><input type="text" name="phone" value="${ ub.phone }" id="phone"/></td>
	    </tr>
	    <tr>
		     <td align="right">地址：</td>
		     <td width="400"><input type="text" name="addr" value="${ ub.addr }" id="addr" /></td>
	    </tr>
	    <tr>
		     <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="修改">
		     <input type="reset" name="reset" id="reset" value="重置"></td>
	    </tr>
	 </table>
</form>
</body>
</html>
